<template>
  <el-container>
    <!-- 头 -->
    <myHeader></myHeader>
    <div class="search_area">
      <div class="belike_nav">
        <div class="belike_nav_tab">
          <div class="green_logo">
            <i class="icon iconfont icon-shouye"></i>
          </div>
          <ul>
            <li>首页</li>
            <li>房源</li>
            <li>发布房源</li>
            <li>帖子</li>
          </ul>
        </div>
      </div>
      <div class="search">
        <el-row class="search__wrap">
          <el-col
            :span="6"
            style="float: left; margin-left: 35px; width: 270px; hight: 40px"
          >
            <el-input
              type="text"
              prefix-icon="el-icon-search"
              v-model="kb_content"
              placeholder="请输入"
              style="width: 270px; cursor: pointer"
              @keyup.enter.native="getAllKb"
            ></el-input>
          </el-col>
        </el-row>
      </div>
    </div>

    <el-container>
      <el-main>
        <el-row class="houselist" v-for="item in houseinfo" :key="item.id">
          <el-col :span="24">
            <div class="block">
              <el-image
                style="width: 230px; height: 178px"
                :src="src"
                :fit="contain"
              ></el-image>

              <div class="info">
                <p class="title">{{ item.title }}</p>
                <p class="detail">2室1厅|76平米|低层（共10层） 张建国</p>
                <p class="site">梅迪大道 三元-列东 徐新路47号</p>
              </div>

              <div class="money">
                <p>
                  <strong>1900</strong>
                  元/月
                </p>
              </div>
            </div>
          </el-col>
        </el-row>
      </el-main>
    </el-container>
    <el-footer>Footer</el-footer>
  </el-container>
</template>


<script>
import myHeader from "../../components/myHeader.vue";
export default {
  components: {
    myHeader,
  },
  data() {
    return {
      src: "https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
      houseinfo: [
        {
          id: 1,
          title: "梅迪大道 爱情公寓 复式两室一厅一卫 精装修",
        },
        {
          id: 2,
          title: "梅迪大道 爱情公寓 复式两室一厅一卫 精装修",
        },
        {
          id: 3,
          title: "梅迪大道 爱情公寓 复式两室一厅一卫 精装修",
        },
        {
          id: 4,
          title: "梅迪大道 爱情公寓 复式两室一厅一卫 精装修",
        },
        {
          id: 5,
          title: "梅迪大道 爱情公寓 复式两室一厅一卫 精装修",
        },
      ],
    };
  },
};
</script>


<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.el-header,
.el-footer {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #d3dce6;
  color: #333;
  text-align: center;
  line-height: 200px;
}

.el-main {
  /* background-color: #e9eef3; */
  color: #333;
  text-align: center;
  /* line-height: 160px; */
  overflow: hidden;
  margin-top: -20px !important;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}

.search_area {
  width: 100%;
  min-width: 1150px;
  height: 150px;
  padding: 25px 0;
  background: #f5f5f6;
  box-sizing: border-box;
  z-index: 5;
  position: relative;
}
.belike_nav {
  width: 1150px;
  height: 30px;
  margin: 0 auto 30px 300px;
  position: absolute;
}
.belike_nav .belike_nav_tab,
.belike_nav .belike_nav_tab li {
  display: inline-block;
  vertical-align: bottom;
  position: relative;
}
.green_logo {
  position: absolute;
  color: #007e63;
  margin-left: 37px;
}
.green_logo i {
  font-size: 50px;
}

.belike_nav .belike_nav_tab ul {
  margin-left: 73px;
}
.belike_nav .belike_nav_tab li {
  line-height: 25px;
  font-size: 16px;
  margin-right: 30px;
  position: relative;
  font-weight: 700;
  list-style: none;
}

.search {
  margin-top: 65px;
  margin-bottom: 24px;
  position: absolute;
  width: 1150px;
  margin-left: 300px;
}
.search .search__wrap {
  display: inline-block;
  width: 710px;
  line-height: 46px;
  font-size: 14px;
  border-radius: 2px;
}
.el-input {
  width: 400px !important;
}
/* 房源 */
.houselist {
  /* margin-bottom: 20px; */
  background-color: #fff;
  border-bottom: 1px dashed #e6e6e6;
  cursor: pointer;
  /* width: 900px; */
  width: 920px;
  height: 220px;
  padding: 20px;
  position: relative;
  /* border-top: 1px dashed black; */
  margin-left: -430px;
  left: 50%;
}
.el-col {
  border-radius: 4px;
}
/* .bg-purple-dark {
  background: #99a9bf;
} */
.bg-purple {
  background: #d3dce6;
}
.bg-purple-light {
  background: #e5e9f2;
}
/* .grid-content {
  border-radius: 4px;
  min-height: 36px;
} */

.block {
  position: relative;
}
.el-image {
  position: absolute;
  display: inline-block;
  overflow: hidden;
  margin-left: -50%;
  /* margin-top: -9px; */
}
.info {
  position: absolute;
  color: #797979;
  /* float: left; */
  left: 30%;
  font-size: 14px;
  overflow: hidden;
  /* padding-left: 20px; */
  width: 460px;
  text-align: left;
  font-family: Microsoft YaHei, 微软雅黑, Hiragino Sans GB, tahoma, arial,
    simhei;
}
.title {
  color: #333;
  font-size: 20px;
  font-weight: 700;
  font-family: "Microsoft YaHei";
}
.detail {
  font-size: 15px;
  font-weight: 700;
  color: #333;
}
.site {
  color: #666;
  font-size: 14px;
}
.money {
  position: absolute;
  float: right;
  width: 112px;
  right: 5%;
  margin-top: 5%;
  color: #eb5f00;
  font-size: 20px;
  font-weight: 700;
}
</style>